package com.icinfo.cloud.provider.punish.service.impl;

import cn.hutool.core.util.StrUtil;
import com.icinfo.cloud.provider.punish.mapper.CasePartiesLegalInfoMapper;
import com.icinfo.cloud.provider.punish.service.ICasePartiesLegalInfoService;
import com.icinfo.cloud.provider.punish.ucase.casemain.model.CasePartiesLegalInfo;
import com.icinfo.framework.core.service.support.MyBatisServiceSupport;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * 案件当事人法人信息表 case_parties_legal_info 对应的Service实现类.<br>
 *
 * @author: Kexin.Hu
 * @date: 2024/3/18 13:58
 */
@Service
@Slf4j
public class CasePartiesLegalInfoServiceImpl extends MyBatisServiceSupport implements ICasePartiesLegalInfoService {

    @Resource
    private CasePartiesLegalInfoMapper casePartiesLegalInfoMapper;

    @Override
    public CasePartiesLegalInfo getPartiesLegalInfoById(String id) {
        if (StrUtil.isBlank(id)) {
            throw new IllegalArgumentException("法人当事人id不能为空");
        }
        return casePartiesLegalInfoMapper.selectByPrimaryKey(id);
    }
}
